package com.example.demoexcel.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.example.demoexcel.config.LocalDateTimeConvert;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author 赵恒
 * @date 2023/5/22
 */
@Data
@AllArgsConstructor
public class Person {
    @ExcelProperty("编号")
    private Integer id;

    @ExcelProperty("姓名")
    private String name;

    @ExcelProperty(value = "出生日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    @ExcelProperty(value = "更新时间", converter = LocalDateTimeConvert.class)
    private LocalDateTime updateTime;
}
